/*
 * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <tencentcloud/tcex/v20200727/model/InvokeServiceRequest.h>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>

using namespace TencentCloud::Tcex::V20200727::Model;
using namespace rapidjson;
using namespace std;

InvokeServiceRequest::InvokeServiceRequest() :
    m_serviceIdHasBeenSet(false),
    m_serviceStatusHasBeenSet(false),
    m_fileUrlHasBeenSet(false),
    m_inputHasBeenSet(false)
{
}

string InvokeServiceRequest::ToJsonString() const
{
    Document d;
    d.SetObject();
    Document::AllocatorType& allocator = d.GetAllocator();


    if (m_serviceIdHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "ServiceId";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_serviceId.c_str(), allocator).Move(), allocator);
    }

    if (m_serviceStatusHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "ServiceStatus";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, m_serviceStatus, allocator);
    }

    if (m_fileUrlHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "FileUrl";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_fileUrl.c_str(), allocator).Move(), allocator);
    }

    if (m_inputHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "Input";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_input.c_str(), allocator).Move(), allocator);
    }


    StringBuffer buffer;
    Writer<StringBuffer> writer(buffer);
    d.Accept(writer);
    return buffer.GetString();
}


string InvokeServiceRequest::GetServiceId() const
{
    return m_serviceId;
}

void InvokeServiceRequest::SetServiceId(const string& _serviceId)
{
    m_serviceId = _serviceId;
    m_serviceIdHasBeenSet = true;
}

bool InvokeServiceRequest::ServiceIdHasBeenSet() const
{
    return m_serviceIdHasBeenSet;
}

int64_t InvokeServiceRequest::GetServiceStatus() const
{
    return m_serviceStatus;
}

void InvokeServiceRequest::SetServiceStatus(const int64_t& _serviceStatus)
{
    m_serviceStatus = _serviceStatus;
    m_serviceStatusHasBeenSet = true;
}

bool InvokeServiceRequest::ServiceStatusHasBeenSet() const
{
    return m_serviceStatusHasBeenSet;
}

string InvokeServiceRequest::GetFileUrl() const
{
    return m_fileUrl;
}

void InvokeServiceRequest::SetFileUrl(const string& _fileUrl)
{
    m_fileUrl = _fileUrl;
    m_fileUrlHasBeenSet = true;
}

bool InvokeServiceRequest::FileUrlHasBeenSet() const
{
    return m_fileUrlHasBeenSet;
}

string InvokeServiceRequest::GetInput() const
{
    return m_input;
}

void InvokeServiceRequest::SetInput(const string& _input)
{
    m_input = _input;
    m_inputHasBeenSet = true;
}

bool InvokeServiceRequest::InputHasBeenSet() const
{
    return m_inputHasBeenSet;
}


